package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 报警记录详情表 实体类
 * 表名：ra_alarm_record_detail
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_alarm_record_detail")
public class RaAlarmRecordDetail implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 报警编码
     */
    @Column(name = "alarm_code", length = 32)
    private String alarmCode;
    
    /**
     * 报警位号
     */
    @Column(name = "alarm_bit_no", length = 128)
    private String alarmBitNo;
    
    /**
     * 报警数值
     */
    @Column(name = "alarm_value", length = 64)
    private String alarmValue;
    
    /**
     * 事故链主键
     */
    @Column(name = "fault_chains_id")
    private Long faultChainsId;
    
    /**
     * 标记原因主键
     */
    @Column(name = "reason_id")
    private Long reasonId;
    
    /**
     * 原因类型
     */
    @Column(name = "reason_type")
    private Byte reasonType;
    
    /**
     * 影响主键
     */
    @Column(name = "influence_id")
    private Long influenceId;
    
    /**
     * 影响描述
     */
    @Column(name = "influence_desc", length = 256)
    private String influenceDesc;
    
    /**
     * 最高残余风险等级
     */
    @Column(name = "remnant_risk", length = 128)
    private String remnantRisk;
    
    /**
     * 报警时间
     */
    @Column(name = "alarm_time")
    private java.time.LocalDateTime alarmTime;
    
    /**
     * 处理状态
     * 默认值: 0
     */
    @Column(name = "handle_state")
    private Byte handleState;
    
    /**
     * 状态
     * 默认值: 0
     */
    @Column(name = "status")
    private Byte status;
    
    /**
     * 操作类型（1、抑制 2、标记 3、上报）
     * 默认值: 0
     */
    @Column(name = "operate_type")
    private Byte operateType;
    
    /**
     * 操作时间
     */
    @Column(name = "operate_time")
    private java.time.LocalDateTime operateTime;
    
    /**
     * 防护设置关联主键
     */
    @Column(name = "measure_setting_id")
    private Long measureSettingId;
    
    /**
     * 防护措施描述
     */
    @Column(name = "measure_desc", length = 512)
    private String measureDesc;
    
    /**
     * 租户主键
     */
    @Column(name = "tenant_id")
    private Integer tenantId;
    
    /**
     * 是否删除（0、否1、是）
     * 默认值: 0
     */
    @Column(name = "is_del", nullable = false)
    private Byte isDel;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time", nullable = false)
    private java.time.LocalDateTime createTime;
    
    /**
     * 创建者
     */
    @Column(name = "create_by", length = 64)
    private String createBy;
    
    /**
     * 更新时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "update_time", nullable = false)
    private java.time.LocalDateTime updateTime;
    
    /**
     * 更新者
     */
    @Column(name = "update_by", length = 64)
    private String updateBy;
    
    @Override
    public String toString() {
        return "RaAlarmRecordDetail{" +
            "id=" + id +
            ", alarmCode=" + alarmCode +
            ", alarmBitNo=" + alarmBitNo +
            ", alarmValue=" + alarmValue +
            ", faultChainsId=" + faultChainsId +
            ", reasonId=" + reasonId +
            ", reasonType=" + reasonType +
            ", influenceId=" + influenceId +
            ", influenceDesc=" + influenceDesc +
            ", remnantRisk=" + remnantRisk +
            ", alarmTime=" + alarmTime +
            ", handleState=" + handleState +
            ", status=" + status +
            ", operateType=" + operateType +
            ", operateTime=" + operateTime +
            ", measureSettingId=" + measureSettingId +
            ", measureDesc=" + measureDesc +
            ", tenantId=" + tenantId +
            ", isDel=" + isDel +
            ", createTime=" + createTime +
            ", createBy=" + createBy +
            ", updateTime=" + updateTime +
            ", updateBy=" + updateBy +
        '}';
    }
} 